﻿<%@ codepage=65001%><% 'UTF-8%>

 
<!--#include file="../Include/Common.All.asp"-->
<!--#include file="../Include/Conn.asp"-->
<% call OpenConn%>

<!--#include file="../Include/Common.Security.asp"-->
<!--#include file="../Include/MD5.asp"-->
<!--#include file="../Include/JSON_2.0.2.asp"-->



<% 
'''给pos的荐权接口'''''''''''''''
''''http://zhenlv.vicp.cc/passport/regok.asp?uname=fashioncat&pas=fashioncat'''''
	dim regok
	regok=0 ''登陆失败
	
	UserName=ReplaceBadChar(Trim(request("uname"))) 
	UserPassword=ReplaceBadChar(Trim(request("pas"))) 
	'UserName="fashioncat"
	'UserPassword="fashioncat"
			Dim rsObj,strSql
	If (UserName <> "" and UserPassword<>""  ) Then
		UserPassword = MD5(UserPassword, 16)
		''regok = PE_CLng(Conn.Execute("select COUNT(UserID) AS regok from PE_User  WHERE (UserName='" & UserName & "' AND UserPassword='" & UserPassword & "')"   )(0)) 
		
		set rsObj=Server.CreateObject("ADODB.Recordset")
		strSql = "SELECT * FROM PE_User WHERE (UserName='" & UserName & "' AND UserPassword='" & UserPassword & "') "
		Set rsObj = Conn.Execute(strSql)
		If rsObj.BOF And rsObj.EOF Then
			regok = 0
		Else
			If (1=rsObj("UserType") ) Then regok = 2 ''登录成功 个人用户
			If (2=rsObj("UserType") ) Then regok = 1 ''登录成功 企业用户		
		End If
		''rsObj.close
		''Set rsObj = Nothing

		
 	end if
    Response.Write regok
 
 
 
call CloseConn
 
%>
